package autotd;

import java.util.ArrayList;
import java.util.List;

import java.awt.Point;

public class Monster extends Unit {
	private static int currid = 1;

	public final MonsterType Type;
	public final int Level;
	public int health;
	public int progress = -1; // current index in the path we are up to
	public boolean passed = false; // have we completed the path?
	public List<String> specials;

	public Monster(MonsterType type, int level) {
		super(type.Delay);
		id = currid;
		Type = type;
		Level = level;
		health = Type.Health + (int)(Type.Health * Level / 2.0);
		specials = new ArrayList<String>();
		currid++;
	}
	
	public int getArmour() {
		return Type.Armour;
	}

	public int getHeight() {
		return Type.Height + Level;
	}

	public int getReward() {
		return Type.Reward;
	}

	public boolean isDead() {
		return health <= 0;
	}
	
	public boolean isPassed() {
		return passed;
	}

	

	public String toString() {
		return id + " " + Type.Name + " " + Level + " " + health + " " + timer + " " + specials;
	}

	public int hashCode() {
		return id;
	}
}